<%--
  Created by IntelliJ IDEA.
  User: MAVI003
  Date: 2017/4/1
  Time: 14:42
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="utf-8">
    <title>拍卖系统</title>
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/images/icon.jpg">
    <link rel="bookmark" href="${pageContext.request.contextPath}/images/icon.jpg">

    <link href="//cdn.bootcss.com/bootstrap/3.0.1/css/bootstrap.min.css" rel="stylesheet">
    <link href="http://ibootstrap-file.b0.upaiyun.com/www.layoutit.com/css/builder/v3/layoutit.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/layoutit.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/my.css" rel="stylesheet">
    <script type="text/javascript" src="http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"></script>
    <script type="text/javascript" src="http://cdn.staticfile.org/jqueryui/1.10.2/jquery-ui.min.js"></script>
    <script type="text/javascript"
            src="http://cdn.staticfile.org/jqueryui-touch-punch/0.2.2/jquery.ui.touch-punch.min.js"></script>
    <script type="text/javascript" src="http://cdn.staticfile.org/twitter-bootstrap/3.0.1/js/bootstrap.min.js"></script>
    <script type="text/javascript"
            src="http://ibootstrap-file.b0.upaiyun.com/www.layoutit.com/js/jquery.htmlClean.js"></script>
    <script type="text/javascript"
            src="http://ibootstrap-file.b0.upaiyun.com/www.layoutit.com/js/builder/v3/scripts.min.js"></script>
    <style type="text/css">
        body{
            background-image: url(${pageContext.request.contextPath}/images/7.jpg);
            background-size:cover;
        }
        .myback{
            background-image: url(${pageContext.request.contextPath}/images/7.jpg);
            background-size:cover;
        }
    </style>

</head>
<body>
<div class="container">


    <div class="row clearfix hideLine">
        <div class="col-md-12 column hideLine myback">
            <jsp:include page="navigation.jsp"></jsp:include>
            <ul class="breadcrumb">
                <li>
                    <a href="#">我的</a>
                </li>
                <li>
                    <a href="#">我拍到的宝贝</a>
                </li>

            </ul>

            <table class="table table-hover">
                <thead>
                <tr>
                    <th>
                        编号
                    </th>
                    <th>
                        图片
                    </th>
                    <th>
                        产品名称
                    </th>
                    <th>
                        产品底价
                    </th>
                    <th>
                        拍得价格
                    </th>
                    <th>
                        商品描述
                    </th>
                    <th>
                        商品分类
                    </th>
                    <th>
                        起始时间
                    </th>
                    <th>
                        结束时间
                    </th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${buyGoodsModels}" var="each" varStatus="status">
                    <tr onclick="window.location.href='showGoodsDetail?gid=${each.gid}'">
                        <td>
                                ${status.count}
                        </td>
                        <td>
                            <img width="80px" height="80px"
                                 src="${pageContext.request.contextPath}/upload/${each.gpicture}"
                                 class="img-rounded">
                        </td>
                        <td>
                                ${each.gname}
                        </td>
                        <td>
                                ${each.gprice}
                        </td>
                        <td>
                                ${each.nowprice}
                        </td>
                        <td>
                                ${each.gdetail}
                        </td>
                        <td>
                            <c:if test="${each.gkindid == 1}">
                                书籍
                            </c:if>
                            <c:if test="${each.gkindid == 0}">
                                其他
                            </c:if>
                        </td>
                        <td>
                            <fmt:formatDate value="${each.gstarttime}" type="both"/>
                        </td>
                        <td>
                            <fmt:formatDate value="${each.gendtime}" type="both"/>
                        </td>
                    </tr>
                </c:forEach>


                </tbody>
            </table>
            <div class="pager">
                <ul>
                    <c:if test="${buyHasPrePage}">
                        <li><a href="${pageContext.request.contextPath}/showMybuygoods?page=1">首页</a>
                        </li>
                        <li>
                            <a href="${pageContext.request.contextPath}/showMybuygoods?page=${buyPrePage}">上一页</a>
                        </li>
                    </c:if>
                    <c:forEach begin="1" end="${buyPageNum}" var="each">
                        <c:choose>
                            <c:when test="${each == nowPage}">
                                <li class="active"><a style="color:black;">${each}</a></li>
                            </c:when>
                            <c:when test="${each >= (nowPage - 2) && each <= (nowPage + 2)}">
                                <li>
                                    <a href="${pageContext.request.contextPath}/showMybuygoods?page=${each}">${each}</a>
                                </li>
                            </c:when>
                        </c:choose>
                    </c:forEach>
                    <c:if test="${buyHasNextPage}">
                        <li>
                            <a href="${pageContext.request.contextPath}/showMybuygoods?page=${buyNextPage}">下一页</a>
                        </li>
                        <li>
                            <a href="${pageContext.request.contextPath}/showMybuygoods?page=${buyPageNum}">尾页</a>
                        </li>
                    </c:if>
                </ul>
            </div>
        </div>
    </div>

</div>
</body>
</html>

